package model

import (
    "time"

    "gorm.io/gorm"
)


type DictBusinessRole struct {
    ID          int64          `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    Name        string         `gorm:"unique;column:name;type:varchar(32);not null" json:"name"`
    Description string         `gorm:"column:description;type:varchar(256);not null" json:"description"`
    CreatedAt   time.Time      `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
    UpdatedAt   time.Time      `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
    DeletedAt   gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
}


type DictCompany struct {
    ID           int64          `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    Name         string         `gorm:"column:name;type:varchar(256);not null" json:"name"`
    Description  string         `gorm:"column:description;type:varchar(512);not null" json:"description"`
    LocationID   int64          `gorm:"column:location_id;type:bigint(20);not null" json:"location_id"`
    ManagerName  string         `gorm:"column:manager_name;type:varchar(32);not null" json:"manager_name"`
    ManagerPhone string         `gorm:"column:manager_phone;type:varchar(32);not null" json:"manager_phone"`
    Type         string         `gorm:"column:type;type:varchar(32);not null" json:"type"`
    CreatedAt    time.Time      `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
    UpdatedAt    time.Time      `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
    DeletedAt    gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
}


type DictDriver struct {
    ID             int64          `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    Name           string         `gorm:"column:name;type:varchar(256);not null" json:"name"`
    Sex            string         `gorm:"column:sex;type:varchar(32);not null" json:"sex"`
    PhotoID        string         `gorm:"column:photo_id;type:varchar(128);not null" json:"photo_id"`
    Type           string         `gorm:"column:type;type:varchar(32);not null" json:"type"`
    IDNumber       string         `gorm:"column:id_number;type:varchar(256);not null" json:"id_number"`
    DrivingLicense string         `gorm:"column:driving_license;type:varchar(64);not null" json:"driving_license"`
    CompanyID      int64          `gorm:"column:company_id;type:bigint(20);not null" json:"company_id"`
    Phone          string         `gorm:"column:phone;type:varchar(32);not null" json:"phone"`
    CreatedAt      time.Time      `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
    UpdatedAt      time.Time      `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
    DeletedAt      gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
}


type DictExternalProject struct {
    ID           int64          `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    Name         string         `gorm:"column:name;type:varchar(256);not null" json:"name"`
    Description  string         `gorm:"column:description;type:varchar(256);not null" json:"description"`
    LocationID   int64          `gorm:"column:location_id;type:bigint(20);not null" json:"location_id"`
    ContactName  string         `gorm:"column:contact_name;type:varchar(64);not null" json:"contact_name"`
    ContactPhone string         `gorm:"column:contact_phone;type:varchar(64);not null" json:"contact_phone"`
    TimeBegin    time.Time      `gorm:"column:time_begin;type:datetime;not null" json:"time_begin"`
    TimeEnd      time.Time      `gorm:"column:time_end;type:datetime;not null" json:"time_end"`
    CreatedAt    time.Time      `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
    UpdatedAt    time.Time      `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
    DeletedAt    gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
}


type DictFactory struct {
    ID              int64          `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    Name            string         `gorm:"column:name;type:varchar(256);not null" json:"name"`
    Description     string         `gorm:"column:description;type:varchar(256);not null" json:"description"`
    LocationID      int64          `gorm:"column:location_id;type:bigint(20);not null" json:"location_id"`
    Supervisor      string         `gorm:"column:supervisor;type:varchar(32);not null" json:"supervisor"`
    SupervisorPhone string         `gorm:"column:supervisor_phone;type:varchar(64);not null" json:"supervisor_phone"`
    CreatedAt       time.Time      `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
    UpdatedAt       time.Time      `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
    DeletedAt       gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
}


type DictLocation struct {
    ID          int64          `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    Name        string         `gorm:"column:name;type:varchar(256);not null" json:"name"`
    Description string         `gorm:"column:description;type:varchar(256);not null" json:"description"`
    Coordinates string         `gorm:"column:coordinates;type:varchar(128);not null" json:"coordinates"`
    Address     string         `gorm:"column:address;type:varchar(512);not null" json:"address"`
    Province    string         `gorm:"column:province;type:varchar(64);not null" json:"province"`
    City        string         `gorm:"column:city;type:varchar(64);not null" json:"city"`
    Town        string         `gorm:"column:town;type:varchar(64);not null" json:"town"`
    CreatedAt   time.Time      `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
    UpdatedAt   time.Time      `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
    DeletedAt   gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
}


type DictMaterial struct {
    ID          int64          `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    Name        string         `gorm:"column:name;type:varchar(256);not null" json:"name"`
    Description string         `gorm:"column:description;type:varchar(256);not null" json:"description"`
    Standard    string         `gorm:"column:standard;type:varchar(256);not null" json:"standard"`
    Type        string         `gorm:"column:type;type:varchar(128);not null" json:"type"`
    SubType     string         `gorm:"column:sub_type;type:varchar(128);not null" json:"sub_type"`
    Code        string         `gorm:"column:code;type:varchar(128);not null" json:"code"`
    CreatedAt   time.Time      `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
    UpdatedAt   time.Time      `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
    DeletedAt   gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
}


type DictMine struct {
    ID          int64          `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    Name        string         `gorm:"column:name;type:varchar(256);not null" json:"name"`
    Description string         `gorm:"column:description;type:varchar(256);not null" json:"description"`
    LocationID  int64          `gorm:"column:location_id;type:bigint(20);not null" json:"location_id"`
    Address     string         `gorm:"column:address;type:varchar(256);not null" json:"address"`
    CreatedAt   time.Time      `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
    UpdatedAt   time.Time      `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
    DeletedAt   gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
}


type DictPath struct {
    ID          int64     `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    CreatedTime time.Time `gorm:"column:created_time;type:datetime" json:"created_time"`
    UpdateTime  time.Time `gorm:"column:update_time;type:datetime" json:"update_time"`
    Name        string    `gorm:"column:name;type:varchar(256)" json:"name"`
    Description string    `gorm:"column:description;type:varchar(256)" json:"description"`
    WayPoint    string    `gorm:"column:way_point;type:varchar(32)" json:"way_point"`
}


type DictTruck struct {
    ID            int64          `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    LicensePlate  string         `gorm:"column:license_plate;type:varchar(64);not null" json:"license_plate"`
    TruckType     string         `gorm:"column:truck_type;type:varchar(32);not null" json:"truck_type"`
    Vin           string         `gorm:"column:vin;type:varchar(128);not null" json:"vin"`
    WeightUnladen int            `gorm:"column:weight_unladen;type:int(11);not null" json:"weight_unladen"`
    WeightMax     int            `gorm:"column:weight_max;type:int(11);not null" json:"weight_max"`
    CompanyID     int64          `gorm:"column:company_id;type:bigint(20);not null" json:"company_id"`
    Purpose       string         `gorm:"column:purpose;type:varchar(64);not null" json:"purpose"`
    PhotoID       string         `gorm:"column:photo_id;type:varchar(128);not null" json:"photo_id"`
    Appearance    string         `gorm:"column:appearance;type:varchar(64);not null" json:"appearance"`
    CreatedAt     time.Time      `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
    UpdatedAt     time.Time      `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
    DeletedAt     gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
}


type DictWarehouse struct {
    ID              int64          `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    Name            string         `gorm:"column:name;type:varchar(256);not null" json:"name"`
    Description     string         `gorm:"column:description;type:varchar(256);not null" json:"description"`
    LocationID      int64          `gorm:"column:location_id;type:bigint(20);not null" json:"location_id"`
    Type            string         `gorm:"column:type;type:varchar(64);not null" json:"type"`
    Supervisor      string         `gorm:"column:supervisor;type:varchar(64);not null" json:"supervisor"`
    SupervisorPhone string         `gorm:"column:supervisor_phone;type:varchar(64);not null" json:"supervisor_phone"`
    CreatedAt       time.Time      `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
    UpdatedAt       time.Time      `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
    DeletedAt       gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
}


type DictWeighbridge struct {
    ID          int64          `gorm:"primary_key;column:ID;type:bigint(20);not null" json:"id"`
    Name        string         `gorm:"column:name;type:varchar(128);not null" json:"name"`
    Description string         `gorm:"column:description;type:varchar(256);not null" json:"description"`
    LocationID  int64          `gorm:"column:location_id;type:bigint(20);not null" json:"location_id"`
    Purpose     string         `gorm:"column:purpose;type:varchar(64);not null" json:"purpose"`
    Model       string         `gorm:"column:model;type:varchar(128)" json:"model"`
    CreatedAt   time.Time      `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
    UpdatedAt   time.Time      `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
    DeletedAt   gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
}
